﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Awesome.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/minified/jquery-ui.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/jquery.alerts.css")" rel="stylesheet" type="text/css" />

    @Content.Script("jquery-1.7.2.min.js", Url)
    @Content.Script("jquery.validate.min.js", Url)
    @Content.Script("jquery.validate.unobtrusive.min.js", Url)
    @Content.Script("jquery.unobtrusive-ajax.min.js", Url)
    @Content.Script("jquery.messagebar.js", Url)
    @Content.Script("jquery-ui-1.8.20.min.js", Url)
    @Content.Script("jquery.form.min.js", Url)
    @Content.Script("Awesome.js", Url)
    @Content.Script("jquery.alerts.js", Url)
    @Content.Script("SeniorProjectWebUI.js", Url)
        
    @*<script src="@Url.Content("~/Scripts/jquery.alerts.js")" type="text/javascript"></script>*@
    

    @RenderSection("head", false)


</head>

<body>
    <div class="page">

        <div id="header">

            <div id="title">
                @if (Request.IsAuthenticated && Session["UserInfo"] != null)
                {
                    <h1>CSE Senior Projects WebApp</h1>
                }
                else
                if (ViewBag.Message == null)
                {
                    <h1 style="line-height: 1em;">CSE Senior Projects WebApp</h1>
                }
                else
                {
                    <h1 style="line-height: 1em;">@ViewBag.Message</h1>
                }
            </div>

            <div id="logindisplay">
                @Html.Partial("_LogOnPartial")
            </div>

            @if (Request.IsAuthenticated && Session["UserInfo"] != null)
            {
            <div id="menucontainer">

                <ul id="menu">
                    <li>@Html.ActionLink("My Project", "Index", "Home")</li>

                    @if (((Qu.SeniorProject.Model.UserInfo)Session["UserInfo"]).IsFaculty)
                    {
                        <li>@Html.ActionLink("Available Students", "AvailableStudents", "Home")</li>
                        <li>@Html.ActionLink("All Projects", "Projects", "Home")</li>
                    }

                    @if (((Qu.SeniorProject.Model.UserInfo)Session["UserInfo"]).IsAdmin)
                    {
                        <li>@Html.ActionLink("All Grades", "AllGrades", "Grading")</li>
                    }
                    
                    <li>@Html.ActionLink("Guide & Templates", "Index", "document")</li>
                    <li>@Html.ActionLink("Schedule", "index", "schedule")</li>
                </ul>

            </div>
                
            }
            
        </div>

        <b><div id="message_bar">@TempData["Message"]</div></b>
        <div id="main">
            @RenderBody()
            <div id="footer">
            </div>
        </div>
    </div>

     <script type="text/javascript">
             $(function () {
                 setInterval(function () {
                     $.get('@Url.Action("Ping", "Home")');
                 }, 600000);
             });
     </script>
</body>
</html>
